package com.gl.saasservice.repository;


import com.gl.saasservice.entity.Permission;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface PermissionRepository
        extends JpaRepository<Permission,Long>, JpaSpecificationExecutor<Permission> {

    List<Permission> findByParentId(Long parentId);

    @Transactional
    void deleteByIdIn(List<Long> ids);
}
